
<legend>Jaringan Matrix</legend>
<div style="padding:5px 0 5px 1px">
            <?php
            if ($this->sponsorId > 0) {
            ?>
            <ul id="organisation_sponsor" class="hide">
                <?php echo $this->sponsor; ?>
            </ul>
            <div id="main_sponsor"></div>
            <?php } ?>

            <br>
            <ul id="organisation" class="hide">
                <?php echo $this->matrix; ?>
            </ul>
            
            <div align="center" id="upline"></div>
            <div id="main"></div>

                <script>
                

                <?php
                if ($this->sponsorId > 0) {
                ?>
                $(function() {
                    $("#organisation_sponsor").orgChart({
                        container: $("#main_sponsor")
                        ,stack      : true
                    });

                });
                <?php } ?>

                $(function() {
                    $("#organisation").orgChart({
                        container: $("#main")
                        ,stack      : true
                        //,interactive: true
                        ,nodeClicked: onChartNodeClicked
                    });

                    $(function(){
                        $("[title]").tipTip();
                    });

                   
                });

                

                
                function onChartNodeClicked($node) {
                    //alert($node.data("actor"));
                    if ($node.data("actor") != undefined){
                        //location.href = $node.data("actor");
                        
                        getChild($node.data("actor"));

                    }
                }

                <?php
                if ($this->parent == 1){
                    ?>
                        document.getElementById('upline').innerHTML = document.getElementById('uplineContent').innerHTML;
                <?php
                }
                ?>
                </script>
        </div>

